package com.opengw.configuration.publish;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.opengw.configuration.route.Route;

@Entity
@Table(name = "publish_basic")
public class BasicPublish extends BasePublish implements Serializable{
	
	private static final long serialVersionUID = -3254677061384364741L;
	private Route route;

	public void setRoute(Route route) {
		this.route = route;
	}

	@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JoinColumn(name = "route_ref")
	public Route getRoute() {
		return route;
	}
}
